diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4a6c0866..bf328e78 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,4 @@ - -name: CI +name: Deploy to GitHub Pages on: push: @@ -7,21 +6,25 @@ on: - main jobs: - publish: + deploy: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@main - - uses: actions/setup-node@v2 + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 with: node-version: '16' - - run: npm install - - run: npm run build-css - - uses: BetaHuhn/do-spaces-action@v2 + + - name: Install dependencies and build static storybook + run: | + npm install + cd app + npm run build-storybook + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 with: - access_key: ${{ secrets.ACCESS_KEY }} - secret_key: ${{ secrets.SECRET_KEY }} - space_name: ${{ secrets.SPACE_NAME }} - space_region: ${{ secrets.SPACE_REGION }} - source: dist - versioning: true + token: ${{ secrets.GITHUB_TOKEN }} + folder: app/storybook-static