Update deploy workflow
This commit is contained in:
parent
3886e7a549
commit
b8d46a4894
|
|
@ -10,21 +10,23 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version-file: '.nvmrc'
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
|
||||||
- name: Build website
|
- name: Build website
|
||||||
run: |
|
run: |
|
||||||
yarn install --frozen-lockfile
|
yarn install --frozen-lockfile
|
||||||
yarn build
|
yarn build
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
if: ${{ github.event_name == 'push' && github.repository_owner == 'rancher' }}
|
if: ${{ github.event_name == 'push' && github.repository_owner == 'rancher' }}
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: ./build
|
path: ./build
|
||||||
retention-days: 10
|
retention-days: 5
|
||||||
compression-level: 9
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Publish
|
name: Publish
|
||||||
if: ${{ github.event_name == 'push' && github.repository_owner == 'rancher' }}
|
if: ${{ github.event_name == 'push' && github.repository_owner == 'rancher' }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue