New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error : Invalid actions OIDC token due to sub_invalid #9
Comments
After a lot of research I managed to make the deployment work, here are the modifications I made: permissions:
contents: read
pages: write
+ deployments: write
id-token: write
...
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@v1-beta Don't understand exactly why theses lines was necessary, this does not seem to correlate with the error message I had. If someone can tell me if what I added is correct, if everything is necessary (or not). |
@BenSouchet that's correct. We'll be documenting it more thoroughly, but in general the reason for this is the deployment needs to know what Also you shouldn't need |
@tcbyrd Thanks for the explanation, It's more clear now 🙂 |
Following what I found here: actions/deploy-pages#9
Environment variables define which branch & python version gets deployed. For examples of the used github action see actions/deploy-pages#20 actions/deploy-pages#9 Additional changes: In https://github.com/ubuntu-Deutschland-eV/verein.ubuntu-de.org/settings/environments/ -> github-pages -> set deployment branches to 'selected branches' with 'master' Thus, pushes to `gh-pages` can not deploy the branch (as it's done normally). Nevertheless, the branch `gh-pages` will contain a file `CNAME` that holds the custom domain name for the github page. Additionaly, only the master branch can deploy a new version to github pages. The domain `verein.ubuntu-de.org` is also verified to make takeovers harder see https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages#verifying-a-domain-for-your-organization-site
Details here: actions/deploy-pages#9
See actions/deploy-pages#9 for an explanation of this.
Environment is needed for deploy-pages as per actions/deploy-pages#9
this time inspired by actions/deploy-pages#9 (comment)
Hi,
I try create a scheduled workflow that is identical to the
pages-build-deployment
workflows provided by Github for Pages.I wanted to use the same actions (
actions/jekyll-build-pages
&actions/deploy-pages
) but I have an issue (error) withactions/deploy-pages
:This is the workflow I made:
Is there anything more to do in order to use the
deploy-pages
action ?I tried to understand if I needed to add or request a
token
but I admit being a little bit lost 🤔@tcbyrd I'm sure you can tell me what i'm doing wrong 🙂
PS: link to one failed deploy
The text was updated successfully, but these errors were encountered: