Skip to content

gh-actionsによるデプロイの追加 #1

gh-actionsによるデプロイの追加

gh-actionsによるデプロイの追加 #1

Workflow file for this run

name: Deploy to Google Cloud Storage
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.138.0'
extended: true
- name: Login to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
token_format: access_token
workload_identity_provider: 'projects/236289982072/locations/global/workloadIdentityPools/gh-pool/providers/provider-github'
service_account: '[email protected]'
- name: Minify
run: hugo --minify
- name: Deploy
run: hugo deploy