Skip to content

Commit

Permalink
fix: config deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommy Alhamra committed Dec 5, 2024
1 parent eda419b commit b49928c
Showing 1 changed file with 12 additions and 54 deletions.
66 changes: 12 additions & 54 deletions .github/workflows/github-actions-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@ on:
branches:
- rc

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build:
name: Build
Expand All @@ -42,51 +31,20 @@ jobs:
path: ./dist

deploy:
# name: Deploy
# needs: build
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'

# steps:
# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: production-files
# path: ./dist

# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./dist
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
if: github.ref == 'refs/heads/main'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
# Upload dist folder
path: './dist'
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

0 comments on commit b49928c

Please sign in to comment.