Skip to content

Deploy Static Site

Deploy Static Site #4

Workflow file for this run

name: Deploy Static Site
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build site
env:
BASE_URL: ${{ steps.pages.outputs.base_path }}/
run: |
cd generator
go mod tidy
go run .
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './public'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4