Skip to content

Commit

Permalink
[Actions] Publish doc to Github Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyvanderaerden committed Oct 8, 2024
1 parent ea2cf00 commit d093c29
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Github Pages

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout commit
uses: actions/checkout@v4

- uses: erlef/setup-beam@v1
with:
otp-version: "26"
elixir-version: "1.17"

- name: Retrieve compile cache
uses: actions/cache@v4
id: mix-cache
with:
path: |
deps
_build
key: ${{ hashFiles('mix.lock') }}

- name: Compile project
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix deps.get
mix deps.compile
mix compile — warnings-as-errors
- name: Build docs
run: mix docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./doc

deploy:
needs: build
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit d093c29

Please sign in to comment.