Skip to content

Commit

Permalink
fix: publish in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
poplingue committed Mar 24, 2022
1 parent 94d2e73 commit eb7c160
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 45 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/publish.yml

This file was deleted.

39 changes: 38 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,42 @@ jobs:
@semantic-release/git
@semantic-release/npm
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

npm-publish:
name: Npm publish
needs: gh-release
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 14.18
- name: Install
run: npm ci
- name: Build
run: npm run build
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}

gh-pages-deploy:
name: Github Pages deploy
needs: npm-publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm clean-install
- run: git config --global user.name "poplingue"
- run: git config --global user.email "paulinegc@protonmail.com"
- run: git remote set-url origin https://github.com/dataesr/react-dsfr.git
- run: npm run deploy
env:
GH_PAT: ${{secrets.GH_PAT}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit eb7c160

Please sign in to comment.