Skip to content

Commit f4b5851

Browse files
scottleechuadavidxwu
authored andcommitted
Replace bin/deploy with GitHub Action (alshedivat#1234)
This PR updates `deploy.yml` to use the GitHub Action [Deploy to GitHub Pages](https://github.com/marketplace/actions/deploy-to-github-pages).
1 parent 3e52be7 commit f4b5851

File tree

4 files changed

+17
-26
lines changed

4 files changed

+17
-26
lines changed

.github/workflows/deploy-docker-tag.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717
- name: Buildx
1818
uses: docker/setup-buildx-action@v1
1919

.github/workflows/deploy-image.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717
- name: Buildx
1818
uses: docker/setup-buildx-action@v1
1919

.github/workflows/deploy.yml

+14-19
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,29 @@ on:
99
branches:
1010
- master
1111
- main
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: write
1216

1317
jobs:
1418
deploy:
1519
runs-on: ubuntu-latest
1620
steps:
17-
- name: Checkout code
21+
- name: Checkout 🛎️
1822
uses: actions/checkout@v3
1923
- name: Setup Ruby
2024
uses: ruby/setup-ruby@v1
2125
with:
22-
ruby-version: '3.0.2'
26+
ruby-version: '3.2.1'
2327
bundler-cache: true
24-
- name: Install deps
28+
- name: Install and Build 🔧
2529
run: |
2630
npm install -g mermaid.cli
27-
- name: Setup deploy options
28-
id: setup
29-
run: |
30-
git config --global user.name "GitHub Action"
31-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
32-
if [[ ${GITHUB_REF} = refs/pull/*/merge ]]; then # pull request
33-
echo "SRC_BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_OUTPUT
34-
echo "NO_PUSH=--no-push" >> $GITHUB_OUTPUT
35-
elif [[ ${GITHUB_REF} = refs/heads/* ]]; then # branch, e.g. master, source etc
36-
echo "SRC_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
37-
fi
38-
echo "DEPLOY_BRANCH=gh-pages" >> $GITHUB_OUTPUT
39-
- name: Deploy website
40-
run: yes | bash bin/deploy --verbose ${{ steps.setup.outputs.NO_PUSH }}
41-
--src ${{ steps.setup.outputs.SRC_BRANCH }}
42-
--deploy ${{ steps.setup.outputs.DEPLOY_BRANCH }}
31+
bundle exec jekyll build
32+
- name: Deploy 🚀
33+
if: github.event_name != 'pull_request'
34+
uses: JamesIves/github-pages-deploy-action@v4
35+
with:
36+
folder: _site
37+

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,7 @@ Starting version [v0.3.5](https://github.com/alshedivat/al-folio/releases/tag/v0
258258

259259
<details><summary>(click to expand) <strong>Manual deployment to GitHub Pages:</strong></summary>
260260

261-
If you need to manually re-deploy your website to GitHub pages, run the deploy script from the root directory of your repository:
262-
```bash
263-
$ ./bin/deploy
264-
```
265-
uses the `master` branch for the source code and deploys the webpage to `gh-pages`.
261+
If you need to manually re-deploy your website to GitHub pages, go to Actions, click "Deploy" in the left sidebar, then "Run workflow."
266262

267263
</details>
268264

0 commit comments

Comments
 (0)