Skip to content

Update all dependencies #6

Update all dependencies

Update all dependencies #6

Workflow file for this run

name: Build
on:
push:
branches:
- main
tags:
- v*
pull_request:
jobs:
lint_and_test:
name: lint and test
uses: arcalot/arcaflow-reusable-workflows/.github/workflows/go_lint_and_test.yaml@main
with:
go_version: ${{ vars.ARCALOT_GO_VERSION }}
build:
name: Build
runs-on: ubuntu-latest
needs:
- lint_and_test
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ vars.ARCALOT_GO_VERSION }}
- name: Build
run: go run generate.go
- name: Upload artifacts
uses: actions/upload-artifact@v5
with:
name: gh-pages
path: gh-pages/*
if-no-files-found: error
deploy:
name: Deploy
runs-on: ubuntu-latest
concurrency:
group: "gh-pages-deploy"
cancel-in-progress: false
permissions:
contents: write
pages: write
id-token: write
needs:
- build
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
run: |
set -euo pipefail
git clone -b gh-pages https://${GITHUB_REPOSITORY_OWNER}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY} dist || (
set -euo pipefail
mkdir -p dist
cd dist
git init
git checkout -b gh-pages
git remote add origin https://${GITHUB_REPOSITORY_OWNER}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}
)
- name: Download artifacts
uses: actions/download-artifact@v6
with:
name: gh-pages
path: artifacts
- name: Deploy
run: |
set -euo pipefail
rsync -az --exclude=.git --delete ./artifacts/ ./dist/
cd dist
git config user.name "Arcabot"
git config user.email 110231824+arcalot-bot@users.noreply.github.com
git add .
if ! git diff-index --quiet HEAD --; then
git commit -m "Publish"
git push --set-upstream --force origin gh-pages
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}