Skip to content

rebuild_pages

rebuild_pages #672

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
repository_dispatch:
types:
- rebuild_pages
env:
GO_VERSION: "1.20"
jobs:
lint:
runs-on: ubuntu-latest
name: "Linting"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: run linters
run: make lint
test:
runs-on: ubuntu-latest
name: "Test"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: run tests
run: make test
build:
name: generate pages
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- run: make generate
env:
VERSION: ${{ github.ref_name }}
SOURCE_URL: https://github.com/${{ github.repository }}/tree/${{ github.sha }}
- name: upload generated pages
uses: actions/upload-artifact@v3
with:
name: go.anx.io
path: public/
deploy:
name: deploy to GitHub Pages
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'main' }}
needs:
- build
- test
steps:
# - uses: actions/deploy-pages@v1-beta
- name: download artifacts
uses: actions/download-artifact@v3
with:
name: go.anx.io
path: public
- name: deploy to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: go.anx.io
force_orphan: true