Skip to content

Commit

Permalink
Update deployment workflow and actions
Browse files Browse the repository at this point in the history
- Upgrade versions of other actions used in deploy-main workflow
- Remove cache step in favor of caching from `actions/setup-node`
- Specify `concurrency` limitation to alow only one deployment at a time
- Uninstall old `gh-pages` dependency
  • Loading branch information
taesungh committed Jan 3, 2024
1 parent 2127550 commit 939c64d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 224 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ permissions:
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
Expand All @@ -18,37 +24,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "20"
cache: "npm"

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- name: Build React project
run: npm run build

- name: Set Up Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v4

- name: Upload build
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
# Upload React build output
path: "build"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
204 changes: 0 additions & 204 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,5 @@
"last 1 safari version"
]
},
"devDependencies": {
"gh-pages": "^3.2.3"
},
"homepage": "https://designatuci.com"
}

0 comments on commit 939c64d

Please sign in to comment.