diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index de12c4a..987e284 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,5 +1,8 @@ name: Docs +permissions: + contents: write + on: push: branches: [master] @@ -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 @@ -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