Skip to content

Commit

Permalink
Fix Builds & Action deploy pages directly (#70)
Browse files Browse the repository at this point in the history
* Always run gh action

* Add version to lib

* Run action on push

* Add missing dependency

* Remove unnecessary check from action

* Remove version from lib

* Deploy from action

* update action

* fix wrong directory
  • Loading branch information
n1ckoates authored Aug 22, 2024
1 parent 284312d commit 8f3d1a0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 20 deletions.
50 changes: 30 additions & 20 deletions .github/workflows/buildPages.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
name: Build and deploy

on:
push:
branches: [master]
paths:
- "plugins/**"
- "themes/**"
workflow_dispatch:
on: [push]

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

jobs:
deploy:
build:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Install pnpm
- name: Install pnpm 📥
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install Node.js
- name: Install Node.js 📥
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
- name: Install dependencies 📥
run: pnpm install

- name: Build plugin(s)
- name: Build plugins 🛠️
run: |
mkdir -p .dist
pnpm run build
Expand All @@ -44,12 +40,26 @@ jobs:
fi
done
- name: Copy themes folder
- name: Copy themes folder 📁
run: |
cp -r themes .dist/themes
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact 📡
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .dist
path: ./.dist

deploy:
if: github.ref == 'refs/heads/master'

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
needs: build

steps:
- name: Publish to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions plugins/Testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"author": "Inrixia",
"main": "./src/index.js",
"dependencies": {
"@inrixia/lib": "workspace:*",
"electron": "^31.3.0"
}
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f3d1a0

Please sign in to comment.