Skip to content

Update go major updates - autoclosed #516

Update go major updates - autoclosed

Update go major updates - autoclosed #516

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@v2
- name: Set up Go
uses: actions/setup-go@v2
- name: Set up Python
uses: actions/setup-python@v2
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@v2
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@v2
with:
ref: gh-pages
path: dist
- name: Download artifacts
uses: actions/download-artifact@v2
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 110231824+arcalot-bot@users.noreply.github.com
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 }}