Build github cache #1244
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: Build github cache | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
## Cancel any multiple runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
if: github.repository == 'erlang/erlang-org' | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: asdf setup | |
uses: asdf-vm/actions/setup@v3 | |
- name: asdf add plugins | |
uses: asdf-vm/actions/plugins-add@v3 | |
- name: asdf cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.asdf/installs | |
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }} | |
restore-keys: | | |
${{ runner.os }}-asdf- | |
- name: asdf install | |
run: asdf install && asdf reshim | |
- name: Install tools | |
run: sudo apt-get install -y xsltproc | |
- name: Fetch otp_versions.table | |
run: make otp_versions.table | |
- name: Build documentation | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: make docs | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: docs # The branch the action should deploy to. | |
folder: docs # The folder the action should deploy. | |
single-commit: true | |
- name: Build _patches | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# We run the un-cached command here as some artifacts may have been uploaded | |
# to github since last time and the cache sha does not catch that | |
run: make patches | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: _patches # The branch the action should deploy to. | |
folder: _patches # The folder the action should deploy. | |
single-commit: true | |
- name: Build faq | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: make faq | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: faq # The branch the action should deploy to. | |
folder: faq # The folder the action should deploy. | |
single-commit: true | |
- name: Build _eeps | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: make _eeps | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: _eeps # The branch the action should deploy to. | |
folder: _eeps # The folder the action should deploy. | |
single-commit: true | |
- name: Trigger netlify build | |
env: | |
NETLIFY_BUILD_TRIGGER: ${{ secrets.NETLIFY_BUILD_TRIGGER }} | |
run: curl -X POST -d {} "${NETLIFY_BUILD_TRIGGER}" |