name: Deploy Docs on: # Trigger the workflow every time you push to the `gh-pages` branch # Using a different branch name? Replace `gh-pages` with your branch's name push: branches: [ gh-pages ] # Allows you to run this workflow manually from the Actions tab on GitHub. workflow_dispatch: inputs: branch: description: 'Branch to use' required: true default: 'gh-pages' # Allow this job to clone the repo and create a page deployment permissions: contents: read pages: write id-token: write jobs: build: runs-on: ubuntu-latest steps: - name: Checkout your repository using git uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install, build, and upload your site env: SITE_URL: ${{ env.SITE_URL }} BASE: ${{ github.event.repository.name }} uses: withastro/action@v4 with: path: docs/ # The root location of your Astro project inside the repository. (optional) deploy: needs: build runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4