name: Build and deploy documentation run-name: ${{ github.actor }} is building the documentation on: push: branches: - master - main jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v4 - uses: ./.github/actions/npm-install with: token: ${{secrets.FONTAWESOME_NPM_AUTH_TOKEN}} - name: Building docs run: npm run ghpages # Upload the docs folder so that it can be downloaded and used in the next "deploy" step - name: Uploading artifact uses: actions/upload-artifact@v4 with: name: build-artifact path: docs deploy: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write runs-on: ubuntu-latest needs: build environment: name: github-pages url: ${{steps.deployment.outputs.page_url}} steps: - name: Downloading artifact uses: actions/download-artifact@v4 with: name: build-artifact path: . - uses: actions/configure-pages@v4 - uses: actions/upload-pages-artifact@v3 with: path: . - id: deployment uses: actions/deploy-pages@v4