You've already forked Openterface_assets
mirror of
https://github.com/TechxArtisanStudio/Openterface_assets.git
synced 2025-06-10 16:33:42 -07:00
35 lines
818 B
YAML
35 lines
818 B
YAML
name: Deploy to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
permissions:
|
|
contents: write
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16'
|
|
|
|
- name: Install dependencies for minification and image conversion
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y webp
|
|
npm install -g uglify-js csso-cli
|
|
|
|
- name: Build and minify project
|
|
run: sh ./build.sh
|
|
|
|
- name: Deploy to gh-pages
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./dist
|
|
publish_branch: gh-pages |