1
0
mirror of https://github.com/barthuijgen/factorio-sites.git synced 2025-01-21 11:41:56 +02:00

Test blueprints deploy to dev

This commit is contained in:
Bart 2021-03-13 17:31:57 +01:00
parent c8ba09346a
commit b6bf91dc33
3 changed files with 27 additions and 4 deletions

View File

@ -1,6 +1,4 @@
node_modules
*.Dockerfile
/credentials
/dist
/.vscode
/.cache

View File

@ -17,7 +17,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@ -33,4 +33,12 @@ jobs:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- run: gsutil -m rsync -r ./dist/apps/blueprints/.next/static gs://factorio-blueprints-assets/dev/_next/static
- run: gsutil -m rsync -r -d ./dist/apps/blueprints/.next/static gs://factorio-blueprints-assets/dev/_next/static
- run: gcloud auth configure-docker --quiet
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: blueprints.github.Dockerfile
push: true
tags: eu.gcr.io/factorio-sites/blueprints:dev

View File

@ -0,0 +1,17 @@
FROM node:14-slim
RUN apt-get -qy update && apt-get -qy install openssl
WORKDIR /usr/src/app
COPY dist/apps/blueprints/package.json ./package.json
COPY yarn.lock .
COPY yalc.lock .
COPY .yalc ./.yalc/
RUN yarn install --production
COPY node_modules/.prisma ./node_modules/.prisma/
COPY dist/apps/blueprints .
CMD ["yarn", "next", "start"]