Skip to content

Update go updates

Update go updates #603

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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
- name: Set up Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: gh-pages
path: dist
- name: Download artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
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 }}