mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
b957d05c49
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Deploy Production Dependencies and Code
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'releases/v*'
|
|
tags-ignore:
|
|
- '*.*'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Production
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 'v16.13.2'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install Yarn
|
|
run: npm install -g yarn
|
|
|
|
- name: Clobber lib
|
|
run: rm -rf lib
|
|
|
|
- name: Set up .gitignore
|
|
run: |
|
|
sed -i -e's/^lib/# lib/' -e's/^node_module/# node_modules/' .gitignore
|
|
|
|
- name: Build
|
|
run: |
|
|
yarn install --frozen-lockfile
|
|
yarn build
|
|
|
|
- name: Install Production node_modules
|
|
run: |
|
|
yarn install --production --frozen-lockfile
|
|
|
|
- name: Commit and Push
|
|
# Keep the run green if the commit fails for the lack of changes
|
|
continue-on-error: True
|
|
run: |
|
|
git config user.email "${{ secrets.GIT_CONFIG_EMAIL }}"
|
|
git config user.name "${{ secrets.GIT_CONFIG_NAME }}"
|
|
git add .
|
|
git commit -m "Deploy Production Code for Commit ${{ github.sha }} 🚀"
|
|
git push
|