diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..795c287 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: "Deploy images to GitHub Pages" + +on: + push: + branches: + - main + +jobs: + build: + name: Deploy + runs-on: ubuntu-latest + + steps: + - name: Checkout theme + uses: actions/checkout@v4 + + - name: Copy images + run: mkdir -p ./dist && cp -r ./{preview,README.md} ./dist + + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: deploy + publish_dir: "./dist" + enable_jekyll: true \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 47452e2..d68fa2b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,12 +16,10 @@ jobs: uses: actions/checkout@v4 - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: 21 + uses: actions/setup-node@v4 - name: Setup pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: version: latest diff --git a/.github/workflows/rp.yml b/.github/workflows/release.yml similarity index 78% rename from .github/workflows/rp.yml rename to .github/workflows/release.yml index 3259241..4a61495 100644 --- a/.github/workflows/rp.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release for Replugged +name: Bundle and release on: push: @@ -17,12 +17,10 @@ jobs: uses: actions/checkout@v4 - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: 21 + uses: actions/setup-node@v4 - name: Setup pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: version: latest @@ -30,7 +28,7 @@ jobs: run: pnpm install - name: Build and bundle theme into .asar - run: pnpm run build:rp + run: pnpm run build:asar - name: Release bundled asar, json, and theme.css uses: ncipollo/release-action@v1 diff --git a/package.json b/package.json index a9234c3..4be33fd 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "dev:rp": "replugged build theme --watch", "dev:vc": "bd-scss dev:vc", "dev:vt": "bd-scss dev:vt", - "build:bd": "bd-scss build", - "build:rp": "replugged bundle theme", + "build:css": "bd-scss build", + "build:asar": "replugged bundle theme", "lint": "prettier ./scss --check", "lint:fix": "prettier ./scss --write --log-level warn", "release": "replugged release"