Skip to content

Commit

Permalink
📦 ci(.github): added checkout action to the release please action
Browse files Browse the repository at this point in the history
  • Loading branch information
prjctimg committed Apr 7, 2024
1 parent d270d7f commit fc8ffbf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: build site
- name: Build site
uses: JamesIves/github-pages-deploy-action@v4
with:
# Upload entire repository
# Upload directory with assets
folder: ./docs/www
branch: gh-pages
clean-exclude: pr-preview
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Deploy GitHub PAges Preview
name: Deploy GitHub Pages Preview
on:
push:
branches:
- main
- dev
pull_request:
types:
- opened
Expand All @@ -15,7 +15,7 @@ jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install and Build
if: github.event.action != 'closed' # skips build step if pr is closed

Expand All @@ -27,7 +27,7 @@ jobs:
uses: rossjrw/[email protected]
with:
token: ${{secrets.GH_PAT}}
preview-branch: main
preview-branch: ${{ github.ref }}
source-dir: ./docs/www
umbrella-dir: ./docs/pr-preview
action: auto
6 changes: 4 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
target-branch: ${github.ref_name}}
token: ${{secrets.GH_PAT}}
if: ${{ steps.release.outputs.release_created }}
# The logic below handles the npm publication:
- uses: actions/checkout@v4
- name: Publish to NPM
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: |
npm install
npm test
Expand All @@ -38,3 +39,4 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH}}
if: ${{ steps.release.outputs.release_created }}

0 comments on commit fc8ffbf

Please sign in to comment.