Skip to content

sylvia's law (#9)

sylvia's law (#9) #22

Workflow file for this run

on:
push:
branches:
- main
name: Deploy
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.92.1'
- name: Build
run: hugo --destination dist/ --minify --config=config.toml
- name: Upload built blog
uses: actions/upload-artifact@v2
with:
name: website
path: dist/
retention-days: 1
deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- id: auth
uses: google-github-actions/auth@v0
with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_CREDENTIALS }}'
# Setup gcloud CLI
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Download built artifact
uses: actions/download-artifact@v2
with:
name: website
path: dist/
- name: Delete website
run: gsutil -m rm -a gs://blog.verygoodsoftwarenotvirus.ru/**
- name: Deploy website
run: gsutil -m cp -r dist/* gs://blog.verygoodsoftwarenotvirus.ru/