Skip to content

Commit

Permalink
✨ Configuração do GH Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
wandersonsales-dev committed Oct 25, 2023
1 parent 20db9ec commit 965b6d3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 19 deletions.
51 changes: 33 additions & 18 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
name: Publish Docs in Git Pages

name: Deploy Docs
on:
workflow_run:
workflows: ["Publish on Github"]
types:
- completed
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
publish:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies and build
run: npm install && npm run build

- name: Deploy with gh-pages
node-version: "18"
- uses: actions/configure-pages@v3
- name: Build
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy-storybook -- -u "github-actions-bot <support+actions@github.com>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm install
npm run deploy-storybook
echo "react-css.squidit.com.br" > CNAME
cd .storybook-static
echo "react-css.squidit.com.br" > CNAME
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ".storybook-static/"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"test-watch": "vitest",
"test:ui": "vitest --ui",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"pre-deploy": "npm run build-storybook",
"deploy-storybook": "npm run pre-deploy && touch ./storybook-static/.nojekyll"
},
"lint-staged": {
"*.{ts,tsx}": [
Expand Down

0 comments on commit 965b6d3

Please sign in to comment.