From a93555ca781f6bfff16a7119ba60724e5b6b4446 Mon Sep 17 00:00:00 2001
From: Anthony Byansi <101401469+AnthonyByansi@users.noreply.github.com>
Date: Sun, 30 Jun 2024 11:10:22 +0300
Subject: [PATCH 1/5] Setup GitHub Actions to auto-publish README to GitHub
Pages
---
.github/ISSUE_TEMPLATE/workflows/deploy.yaml | 34 ++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE/workflows/deploy.yaml
diff --git a/.github/ISSUE_TEMPLATE/workflows/deploy.yaml b/.github/ISSUE_TEMPLATE/workflows/deploy.yaml
new file mode 100644
index 0000000..e7a90e5
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/workflows/deploy.yaml
@@ -0,0 +1,34 @@
+name: Deploy to GitHub Pages
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - README.md
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: '16'
+
+ - name: Generate index.html from README
+ run: |
+ echo '
README' > index.html
+ cat README.md | markdown >> index.html
+ echo '' >> index.html
+
+ - name: Deploy to GitHub Pages
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./
+ keep_files: false
From 2dc2ad4c83693aa2529c72341d2ba097b198d458 Mon Sep 17 00:00:00 2001
From: Anthony Byansi <101401469+AnthonyByansi@users.noreply.github.com>
Date: Sun, 30 Jun 2024 11:15:20 +0300
Subject: [PATCH 2/5] Renamed the job to `build-and-deploy` to avoid reserved
keywords
---
.github/ISSUE_TEMPLATE/workflows/deploy.yaml | 36 ++++++++++----------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/workflows/deploy.yaml b/.github/ISSUE_TEMPLATE/workflows/deploy.yaml
index e7a90e5..d4a0629 100644
--- a/.github/ISSUE_TEMPLATE/workflows/deploy.yaml
+++ b/.github/ISSUE_TEMPLATE/workflows/deploy.yaml
@@ -8,27 +8,27 @@ on:
- README.md
jobs:
- deploy:
+ build-and-deploy:
runs-on: ubuntu-latest
steps:
- - name: Checkout repository
- uses: actions/checkout@v2
+ - name: Checkout repository
+ uses: actions/checkout@v2
- - name: Setup Node.js
- uses: actions/setup-node@v2
- with:
- node-version: '16'
+ - name: Setup Node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: '16'
- - name: Generate index.html from README
- run: |
- echo 'README' > index.html
- cat README.md | markdown >> index.html
- echo '' >> index.html
+ - name: Convert README to HTML
+ run: |
+ echo 'README' > index.html
+ cat README.md | markdown >> index.html
+ echo '' >> index.html
- - name: Deploy to GitHub Pages
- uses: peaceiris/actions-gh-pages@v3
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./
- keep_files: false
+ - name: Deploy to GitHub Pages
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./
+ keep_files: false
From 03819b09d682637e8b3b14b5e375309e5a99876c Mon Sep 17 00:00:00 2001
From: Anthony Byansi <101401469+AnthonyByansi@users.noreply.github.com>
Date: Mon, 15 Jul 2024 16:08:58 +0300
Subject: [PATCH 3/5] Refactor github actions workflow to use only first-party
actions for github pages deployment
---
.github/ISSUE_TEMPLATE/workflows/deploy.yaml | 22 +++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/workflows/deploy.yaml b/.github/ISSUE_TEMPLATE/workflows/deploy.yaml
index d4a0629..1c8b107 100644
--- a/.github/ISSUE_TEMPLATE/workflows/deploy.yaml
+++ b/.github/ISSUE_TEMPLATE/workflows/deploy.yaml
@@ -26,9 +26,21 @@ jobs:
cat README.md | markdown >> index.html
echo '