diff --git a/docs/content/documentation/deployment/github-pages.md b/docs/content/documentation/deployment/github-pages.md index f8bfa6d133..98d9140b55 100644 --- a/docs/content/documentation/deployment/github-pages.md +++ b/docs/content/documentation/deployment/github-pages.md @@ -30,9 +30,9 @@ Using *Github Actions* for the deployment of your Zola-Page on Github-Pages is p 2. Create the *Github Action*. 3. Check the *Github Pages* section in repository settings. -Let's start with the token. Remember, if you are publishing the site on the same repo, you do not need to follow that step. +Let's start with the token. Remember, if you are publishing the site on the same repo, you do not need to follow that step. But you will still need to pass in the automatic `GITHUB_TOKEN` as explained [here](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#example-1-passing-the-github_token-as-an-input). -For creating the token either click on [here](https://github.com/settings/tokens) or go to Settings > Developer Settings > Personal access tokens. Under the *Select Scopes* section, give it *repo* permissions and click *Generate token*. Then copy the token, navigate to your repository and add in the Settings tab the *Secret* `TOKEN` and paste your token in it. +For creating the token either click on [here](https://github.com/settings/tokens/new?scopes=public_repo) or go to Settings > Developer Settings > Personal access tokens. Under the *Select Scopes* section, give it *public_repo* permissions and click *Generate token*. Then copy the token, navigate to your repository and add in the Settings tab the *Secret* `TOKEN` and paste your token in it. Next we need to create the *Github Action*. Here we can make use of the [zola-deploy-action](https://github.com/shalzz/zola-deploy-action). Go to the *Actions* tab of your repository, click on *set up a workflow yourself* to get a blank workflow file. Copy the following script into it and commit it afterwards; note that you may need to change the `github.ref` branch from `main` to `master` or similar, as the action will only run for the branch you choose. @@ -54,6 +54,8 @@ jobs: PAGES_BRANCH: gh-pages # Provide personal access token TOKEN: ${{ secrets.TOKEN }} + # Or if publishing to the same repo, use the automatic token + #TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` This script is pretty simple, because the [zola-deploy-action](https://github.com/shalzz/zola-deploy-action) is doing everything for you. You just need to provide some details. For more configuration options check out the [README](https://github.com/shalzz/zola-deploy-action/blob/master/README.md). @@ -75,9 +77,9 @@ jobs: if: github.ref != 'refs/heads/main' steps: - name: 'checkout' - uses: actions/checkout@v2 + uses: actions/checkout@v3.0.0 - name: 'build' - uses: shalzz/zola-deploy-action@v0.13.0 + uses: shalzz/zola-deploy-action@v0.16.1 env: PAGES_BRANCH: gh-pages BUILD_DIR: . @@ -88,9 +90,9 @@ jobs: if: github.ref == 'refs/heads/main' steps: - name: 'checkout' - uses: actions/checkout@v2 + uses: actions/checkout@v3.0.0 - name: 'build and deploy' - uses: shalzz/zola-deploy-action@v0.13.0 + uses: shalzz/zola-deploy-action@v0.16.1 env: PAGES_BRANCH: master BUILD_DIR: .