Created
October 22, 2022 08:35
-
-
Save mayel/a6ca4c2d0def19600e86803232b7709c to your computer and use it in GitHub Desktop.
mix-docs-gh-pages-action.yaml
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
name: Generate mix docs & deploy to github pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docs: | |
name: Generate & deploy | |
runs-on: ubuntu-latest | |
container: elixir:1.13-alpine | |
env: | |
MIX_ENV: dev | |
CI: true | |
steps: | |
- name: Trust my repo # see https://github.com/actions/checkout/issues/760 | |
run: export GIT_CEILING_DIRECTORIES=/__w && git config --global --add safe.directory /__w/my-app-name/my-app-name | |
- name: Install hex | |
run: mix local.hex --force | |
- name: Install rebar | |
run: mix local.rebar --force | |
- name: Install dependencies | |
run: mix deps.get | |
- | |
name: Generate docs | |
run: mix docs | |
- | |
name: Deploy docs | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./doc | |
cname: docs.mydomain.org # optional |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment