Deploy your projects to Github Pages with GitHub Actions pierresaid on August 31, 2019 In this post I am going to explain how to set up a basic workflow that uses an existing GitHub action. This workflow will deploy a static web site ... Read full post Submit Preview Dismiss Collapse Expand Steve Winton Steve Winton Steve Winton Follow Joined Feb 1, 2018 • Sep 1 '19 Dropdown menu Copy link Hide Nice write up! I think ${{ secrets.ACCESS_TOKEN }} in your example can be replaced with ${{ secrets.GITHUB_TOKEN }}, which is a repo-scoped token automatically generated for you by GitHub. Did you try this? Collapse Expand pierresaid pierresaid pierresaid Follow ᴅᴇᴠ Location Paris - France Education yes Joined Jul 3, 2019 • Sep 1 '19 • Edited on Sep 1 • Edited Dropdown menu Copy link Hide Thanks! I just tried it, but it didn't work. Also, I couldn't find the documentation about this auto generated token. Collapse Expand Steve Winton Steve Winton Steve Winton Follow Joined Feb 1, 2018 • Sep 1 '19 Dropdown menu Copy link Hide Hmmm. It’s documented here: help.github.com/en/articles/virtua... But maybe it doesn’t carry the right permissions for your use case. Did you get a permissions error? pierresaid pierresaid pierresaid Follow ᴅᴇᴠ Location Paris - France Education yes Joined Jul 3, 2019 • Sep 1 '19 Dropdown menu Copy link Hide When the Action try to push the changes, it pops this error in the logs: fatal: could not read Password for 'https://***@github.com': No such device or address That must be a permissions error. The personal access token that I generated before (ACCESS_TOKEN) had full control of my private repositories. Collapse Expand Renato Vicente Renato Vicente Renato Vicente Follow :) Joined Nov 27, 2019 • Nov 27 '19 Dropdown menu Copy link Hide could you upgrade this article to v3 Collapse Expand pierresaid pierresaid pierresaid Follow ᴅᴇᴠ Location Paris - France Education yes Joined Jul 3, 2019 • Nov 27 '19 Dropdown menu Copy link Hide Done ! Collapse Expand pierresaid pierresaid pierresaid Follow ᴅᴇᴠ Location Paris - France Education yes Joined Jul 3, 2019 • Sep 2 '19 Dropdown menu Copy link Hide Fixed it ! 👍 Collapse Expand Sanmi Sanmi Sanmi Follow Software Developer from Nigeria. I love to create cool things that work on the internet and share useful knowledge and insights. Location Lagos, Nigeria Joined Sep 15, 2020 • Jun 5 '21 Dropdown menu Copy link Hide How do we implement the process.env with plain html/css/vanilla js? Collapse Expand Noam Tamim Noam Tamim Noam Tamim Follow Joined Aug 4, 2018 • Dec 23 '19 Dropdown menu Copy link Hide Please explain -- why should I use it? GitHub Pages are already automatically deployed. What am I missing? Collapse Expand pierresaid pierresaid pierresaid Follow ᴅᴇᴠ Location Paris - France Education yes Joined Jul 3, 2019 • Dec 23 '19 • Edited on Jan 6 • Edited Dropdown menu Copy link Hide For project like React, Vue or Angular you will need to build the project to have the html,css and js files that Github Pages can serve. Github Actions will automate this step for you. Collapse Expand Noam Tamim Noam Tamim Noam Tamim Follow Joined Aug 4, 2018 • Dec 23 '19 Dropdown menu Copy link Hide You mean, for sites that are not simple Jekyll? Got it. Collapse Expand pierresaid pierresaid pierresaid Follow ᴅᴇᴠ Location Paris - France Education yes Joined Jul 3, 2019 • Mar 8 '20 Dropdown menu Copy link Hide Thanks 😀 Code of Conduct • Report abuse
Nice write up!
I think
${{ secrets.ACCESS_TOKEN }}in your example can be replaced with${{ secrets.GITHUB_TOKEN }}, which is a repo-scoped token automatically generated for you by GitHub. Did you try this?Thanks!
I just tried it, but it didn't work.
Also, I couldn't find the documentation about this auto generated token.
Hmmm. It’s documented here:
But maybe it doesn’t carry the right permissions for your use case. Did you get a permissions error?
When the Action try to push the changes, it pops this error in the logs:
fatal: could not read Password for 'https://***@github.com': No such device or addressThat must be a permissions error. The personal access token that I generated before (
ACCESS_TOKEN) had full control of my private repositories.could you upgrade this article to v3
Done !
Fixed it ! 👍
How do we implement the process.env with plain html/css/vanilla js?
Please explain -- why should I use it? GitHub Pages are already automatically deployed. What am I missing?
For project like React, Vue or Angular you will need to build the project to have the html,css and js files that Github Pages can serve.
Github Actions will automate this step for you.
You mean, for sites that are not simple Jekyll? Got it.
Thanks 😀