Skip to content

Merge pull request #34 from Pierre-Alexandre35/infra/gcp #61

Merge pull request #34 from Pierre-Alexandre35/infra/gcp

Merge pull request #34 from Pierre-Alexandre35/infra/gcp #61

name: Front End Deployment on Google Cloud Storage Bucket
on:
push:
branches: [ "main" ]
jobs:
build-front:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./travian/frontend/
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checking out code
uses: actions/checkout@v3
- name: Google Auth
id: auth
uses: 'google-github-actions/auth@v1.1.1'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- name: Fix Auth
run: yes | gcloud auth login --cred-file="$GOOGLE_APPLICATION_CREDENTIALS"
- name: Installing Vue3 dependencies
run: npm install
- name: Compiling the Vue3 project into a static folder
run: npm run build
- name: Moving the static folder into Google Cloud Storage bucket
run: gsutil cp -r dist/* gs://travian.rest