Skip to content

Update projects/dataans/index.md #27

Update projects/dataans/index.md

Update projects/dataans/index.md #27

name: Build & Deploy
env:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_BUCKET: ${{ secrets.GCP_BUCKET }}
on:
push:
branches:
- 'main'
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Get Zola'
run: wget "https://github.com/getzola/zola/releases/download/v0.17.2/zola-v0.17.2-x86_64-unknown-linux-gnu.tar.gz"
- name: 'Extract zola'
run: tar xzf zola-v0.17.2-x86_64-unknown-linux-gnu.tar.gz
- name: 'Build site'
run: ./zola build
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: google-github-actions/setup-gcloud@v2
- name: 'Deploy'
run: 'gsutil -h "Cache-Control:no-store" -m cp -r public/* gs://${GCP_BUCKET}'