-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from ditrit/feature/update_publish
Feature: update publish workflow
- Loading branch information
Showing
4 changed files
with
63 additions
and
51 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -6,15 +6,15 @@ on: | |
- '[0-9]+\.[0-9]+\.[0-9]+' | ||
|
||
jobs: | ||
publish: | ||
publish_npm: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.16.0 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
@@ -29,3 +29,50 @@ jobs: | |
run: npm login && npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
|
||
publish_docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.16.0 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Setup npm | ||
run: npm install -g [email protected] | ||
|
||
- uses: actions/cache/restore@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('./package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Prepare generation of documentation | ||
run: npm run prepare:docs | ||
|
||
- name: Prepare generation of documentation | ||
run: npm run build:docs | ||
|
||
- name: Extract version from package.json | ||
id: extract_version | ||
run: VERSION=$(jq -r '.version' package.json) echo "PACKAGE_VERSION=${VERSION}" >> $GITHUB_ENV | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: './docs/@ditrit/leto-modelizer-plugin-core/${{env.PACKAGE_VERSION}}' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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