Skip to content

static deployment

static deployment #12

Workflow file for this run

name: Deploy static content to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Setup Go environment
uses: actions/setup-go@v5.0.2
with:
go-version: '1.23.2'
- name: Build static files
env:
BUILD_STATIC: "true"
run: |
cd pwa &&
mkdir -p ./app/web &&
echo -n ${{ vars.FLUSH_API_URL }} > ./app/web/apiurl &&
GOARCH=wasm GOOS=js go build -o ./app/web/app.wasm &&
BUILD_STATIC=true go build &&
./flush-log &&
ls -ltrRa &&
mv ./*.html ./*.webmanifest ./*.js ./app &&
mv app ..
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './app'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4