forked from danth/stylix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Link: danth#519 Link: https://github.com/trueNAHO/dotfiles/tree/4def3ff8e37a8c0511c34e80ee13c92c8ceea4be/.github/workflows/docs.yml
- Loading branch information
Showing
1 changed file
with
18 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,36 @@ | ||
--- | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
|
||
permissions: | ||
contents: read | ||
concurrency: | ||
cancel-in-progress: true | ||
group: pages | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@v13 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
extra-conf: | | ||
extra-experimental-features = nix-command flakes | ||
- name: Set up cache | ||
uses: DeterminateSystems/magic-nix-cache-action@v7 | ||
|
||
- name: Build docs | ||
run: nix -L build github:${{ github.repository }}/${{ github.sha }}#docs | ||
|
||
- name: Prepare docs for upload | ||
run: cp -r --dereference --no-preserve=mode,ownership result/ public/ | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: public/ | ||
|
||
deploy: | ||
name: Deploy | ||
|
||
needs: build | ||
|
||
permissions: | ||
pages: write | ||
contents: read | ||
id-token: write | ||
pages: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Deploy docs to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v13 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v7 | ||
- run: nix build .#docs | ||
|
||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: result | ||
|
||
- uses: actions/deploy-pages@v4 |