Skip to content

Update go updates #1096

Update go updates

Update go updates #1096

Workflow file for this run

name: Build & Deploy Website
on:
push:
branches-ignore:
- 'gh-pages'
pull_request:
branches-ignore:
- 'gh-pages'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
- name: Install requirements.txt
run: pip install -r requirements.txt
- name: Docsgen
run: |
cd docsgen
go build -o ../arcaflow-docsgen .
chmod +x ../arcaflow-docsgen
cd ..
cd docs/arcaflow
../../arcaflow-docsgen
- name: Build site
run: mkdocs build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: site
path: site/*
if-no-files-found: error
deploy:
name: Deploy
runs-on: ubuntu-latest
needs:
- build
if: github.ref == 'refs/heads/main'
permissions:
contents: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
path: dist
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: site
path: artifacts
- name: Deploy
run: |
set -euo pipefail
rsync -az --exclude=.git --delete ./artifacts/ ./dist/
cd dist
git config user.name "Arcabot of Arcalot"
git config user.email [email protected]
git add .
if ! git diff-index --quiet HEAD --; then
git commit -m "Website publish"
git push --set-upstream --force origin gh-pages
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}