feat(ci): Merge all workflows into one file
This commit is contained in:
parent
3c71af1950
commit
465268c194
2 changed files with 28 additions and 34 deletions
29
.github/workflows/check.yml
vendored
29
.github/workflows/check.yml
vendored
|
@ -20,12 +20,39 @@ jobs:
|
|||
- name: Run `nix flake check`
|
||||
run: nix flake check
|
||||
lockfile:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: check
|
||||
if: ${{ github.event_name == 'schedule' }} # only run when scheduled
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@v9
|
||||
- uses: DeterminateSystems/update-flake-lock@v20
|
||||
- name: Run `nix flake check`
|
||||
run: nix flake check
|
||||
build-documentation:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name != 'schedule' }} # only run when not scheduled
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@v9
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v3
|
||||
- name: Build documentation
|
||||
run: nix build .#docs --print-build-logs
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: ./result
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-documentation
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'main' }} # only run triggered by a push on main
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
||||
|
|
33
.github/workflows/deploy.yml
vendored
33
.github/workflows/deploy.yml
vendored
|
@ -1,33 +0,0 @@
|
|||
name: Deploy Documentation
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-website:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@v9
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v3
|
||||
- name: Build documentation
|
||||
run: nix build .#docs --print-build-logs
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: ./result
|
||||
deploy:
|
||||
needs: build-website
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
Loading…
Reference in a new issue