Skip to content

imotD is testing out GitHub Actions πŸš€ #18

imotD is testing out GitHub Actions πŸš€

imotD is testing out GitHub Actions πŸš€ #18

name: GitHub Actions Deploy
run-name: ${{ github.actor }} is testing out GitHub Actions πŸš€
on:
push:
branches:
- rc
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm install
- name: Build project
run: npm run deploy
- name: Upload production-ready build files
uses: actions/upload-artifact@v4
with:
name: production-files
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