1
1
mirror of https://github.com/orhun/git-cliff.git synced 2024-09-11 06:55:38 +03:00

refactor(ci): test the website deployment with a different job

This commit is contained in:
Orhun Parmaksız 2023-04-15 20:32:18 +03:00
parent a5a78fc4c5
commit 2d721259ca
No known key found for this signature in database
GPG Key ID: F83424824B3E4B90

View File

@ -23,8 +23,29 @@ env:
NODE_OPTIONS: --max-old-space-size=6144
jobs:
test-deploy:
name: Test deployment
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
cache-dependency-path: ./website/package-lock.json
- name: Install dependencies
working-directory: ./website
run: yarn install --frozen-lockfile --non-interactive
- name: Build
working-directory: ./website
run: yarn build
deploy:
name: Deploy website
if: github.event_name != 'pull_request'
runs-on: ubuntu-22.04
environment:
name: github-pages
@ -45,14 +66,11 @@ jobs:
working-directory: ./website
run: yarn build
- name: Setup Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v1
- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v1
with:
path: website/build
- name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
id: deployment
uses: actions/deploy-pages@v1