-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Emilien Escalle <[email protected]>
- Loading branch information
Showing
1 changed file
with
40 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,11 @@ jobs: | |
needs: ci | ||
runs-on: ubuntu-latest | ||
environment: github-pages | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_PRIVATE_ACCESS_TOKEN }} | ||
|
||
- uses: hoverkraft-tech/ci-github-nodejs/actions/[email protected] | ||
|
||
|
@@ -25,37 +26,51 @@ jobs: | |
name: build | ||
path: / | ||
|
||
- name: π Configure publish | ||
env: | ||
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | ||
git config --local user.name "${{ github.actor }}" | ||
- uses: googleapis/release-please-action@v4 | ||
with: | ||
release-type: node | ||
skip-github-pull-request: true | ||
|
||
- name: π¦ Publish NPM packages | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_PRIVATE_ACCESS_TOKEN }} | ||
run: | | ||
npx standard-version | ||
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | ||
run: npm publish --access public | ||
|
||
echo `git add -A && git commit -m "chore: prepare release"` | ||
git push --follow-tags origin ${{ github.event.repository.default_branch }} | ||
docs-publish: | ||
name: Publish documentation | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: ci | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
npm publish --access public | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: / | ||
|
||
- name: π Publish to gh-pages | ||
run: | | ||
- run: | | ||
mkdir -p /tmp | ||
cp -R build/docs /tmp/publish | ||
cp -R docs /tmp/publish/ | ||
- name: π Publish Github pages | ||
uses: peaceiris/[email protected] | ||
- name: βοΈ Setup Pages | ||
uses: actions/configure-pages@v5 | ||
|
||
- name: Build with Jekyll | ||
uses: actions/jekyll-build-pages@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: /tmp/publish | ||
enable_jekyll: true | ||
user_name: ${{ github.actor }} | ||
user_email: ${{ github.actor }}@users.noreply.github.com | ||
source: ./ | ||
destination: ./_site | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
|
||
- name: π Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |