Skip to content
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

Setup GitHub Actions for README auto-deployment to GitHub Pages #33

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

AnthonyByansi
Copy link
Contributor

Hi @fhinkel

This pull request adds a GitHub Actions workflow to automatically publish changes from the README.md to GitHub Pages. The workflow is triggered on pushes to the main branch that include changes to the README.md. It converts the README.md into an index.html and deploys it.

Changes:

  • Created .github/workflows/deploy.yml to define the GitHub Actions workflow.
  • The workflow checks out the code, converts the README.md to index.html, and deploys it using peaceiris/actions-gh-pages.

Resolves #22

@fhinkel
Copy link
Contributor

fhinkel commented Jul 1, 2024

Hi @AnthonyByansi 👋 Thanks for the PR! Adding @sarah-yo for review.

@fhinkel fhinkel requested a review from sarah-yo July 1, 2024 01:36
@sarah-yo
Copy link
Collaborator

sarah-yo commented Jul 2, 2024

Hi @AnthonyByansi, what is the goal of this PR?

@AnthonyByansi
Copy link
Contributor Author

Hi @sarah-yo
Well, as you might have noticed, the repo site is not updated automatically, it only reflects changes for the initial deployment.
image

As spotted by #22
reolves #22

@sarah-yo
Copy link
Collaborator

sarah-yo commented Jul 12, 2024

@AnthonyByansi understand. However, this can be done using a first party Github action now rather than a third party one (like this example here: https://github.com/tonybaloney/vscode-pets/blob/main/.github/workflows/docs.yml , please can you update this to use native GH actions?

@sarah-yo sarah-yo self-assigned this Jul 15, 2024
@AnthonyByansi
Copy link
Contributor Author

Hi @sarah-yo
I've made modifications to the workflow through: 03819b0

@sarah-yo
Copy link
Collaborator

@AnthonyByansi can you please make sure the job had appripriate permissions, I think you need a statement along the lines of this:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

# Allow one concurrent deployment
concurrency:
  group: "pages"
  cancel-in-progress: true
@AnthonyByansi
Copy link
Contributor Author

@sarah-yo Thanks for your constructive feedback.
I've added the necessary sections through 14109ba and 8e73a8b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants