Skip to content

Commit

Permalink
Update GHA actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Sep 3, 2024
1 parent f861c1b commit 8ea1f8e
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Docs

permissions:
contents: write

on:
push:
branches: [master]
Expand All @@ -9,28 +12,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v3.x
uses: rlespinasse/github-slug-action@v4

- name: Install Crystal
uses: oprypin/install-crystal@v1
uses: crystal-lang/install-crystal@v1

- name: Download source
uses: actions/checkout@v2
with:
persist-credentials: false
uses: actions/checkout@v4

- name: Install dependencies
run: shards install
env:
SHARDS_OPTS: --ignore-crystal-version

- name: Build docs
run: |
sed -i -e 's:<.*>::g' README.md
crystal docs --project-version="${{ env.GITHUB_REF_SLUG }}" --source-refname="${{ env.GITHUB_SHA_SHORT }}"
run: crystal docs --project-version="${{ env.GITHUB_REF_SLUG }}" --source-refname="${{ env.GITHUB_SHA_SHORT }}"

- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: docs
path: docs
Expand All @@ -40,15 +37,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: docs
path: docs

- name: Deploy docs 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs
CLEAN: true
branch: gh-pages
folder: docs
clean: true

0 comments on commit 8ea1f8e

Please sign in to comment.