Merge pull request #17 from catppuccin/renovate/ex_doc-0.x #36
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: Documentation CI | |
on: | |
push: | |
branches: [ "main" ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
documentation: | |
name: Update documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: ${{ github.head_ref }} | |
- name: Set up Elixir | |
uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1.18.2 | |
with: | |
elixir-version: '1.17.3' # [Required] Define the Elixir version | |
otp-version: '27.0' # [Required] Define the Erlang/OTP version | |
- name: Restore dependencies cache | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Generate Documentation | |
run: mix docs | |
- name: Include docs folder | |
run: | | |
sed -i '/\/docs\//d' .gitignore | |
- name: Commit changes to documentation branch | |
env: | |
ATTR_NAME: 'github-actions[bot]' | |
ATTR_EMAIL: 'github-actions[bot]@users.noreply.github.com' | |
run: | | |
git config --global user.name $ATTR_NAME | |
git config --global user.email $ATTR_EMAIL | |
git add docs/* | |
git commit -am "Automatic docs generation" | |
git fetch origin docs | |
git push origin main:docs --force-with-lease |