Bump vite from 4.0.5 to 4.4.9 #330
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Preview | |
permissions: | |
actions: none | |
checks: none | |
contents: read | |
deployments: none | |
id-token: none | |
issues: none | |
discussions: none | |
packages: none | |
pages: none | |
pull-requests: write | |
repository-projects: none | |
security-events: none | |
statuses: none | |
on: | |
pull_request: | |
jobs: | |
build-and-deploy: | |
concurrency: ci-${{ github.ref }} | |
runs-on: self-hosted | |
steps: | |
- name: Edit PR Description | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: Beakyn/gha-comment-pull-request@2167a7aee24f9e61ce76a23039f322e49a990409 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
pull-request-number: ${{ steps.readctx.outputs.prnumber }} | |
description-message: | | |
---- | |
⌛ Deploy Preview - Build in Progress | |
- name: Checkout 🛎️ | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
name: Setup node | |
if: ${{ github.ref != 'refs/heads/main' }} | |
with: | |
node-version: "18" | |
- name: Create env file | |
if: ${{ github.ref != 'refs/heads/main' }} | |
run: | | |
echo "VITE_MATRIX_SERVER_URL=https://matrix.art.midnightthoughts.space" > .env.local | |
echo "VITE_MATRIX_INSTANCE_ADMIN=@administrator:art.midnightthoughts.space" >> .env.local | |
echo "VITE_MATRIX_ROOT_FOLDER=#Matrix_Art:art.midnightthoughts.space" >> .env.local | |
- name: Install and Build 🔧 | |
if: ${{ github.ref != 'refs/heads/main' }} | |
run: | | |
apt-get update && apt-get install -y patch | |
npm ci | |
mv .github/package.json.patch node_modules/matrix-js-sdk/package.json.patch | |
pushd node_modules/matrix-js-sdk/ | |
patch package.json < package.json.patch | |
popd | |
npx tsc && npx vite build --base /pr-${{ github.event.pull_request.number }}/ | |
- name: Deploy to gh-pages | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
publish_dir: ./dist | |
destination_dir: ./pr-${{ github.event.pull_request.number }} | |
cname: preview.art.midnightthoughts.space | |
external_repository: MTRNord/matrix-art-preview | |
- name: Edit PR Description | |
if: ${{ github.ref != 'refs/heads/main' }} | |
uses: Beakyn/gha-comment-pull-request@2167a7aee24f9e61ce76a23039f322e49a990409 | |
env: | |
BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
description-message: | | |
---- | |
😎 Browse the preview: https://preview.art.midnightthoughts.space/pr-${{ github.event.pull_request.number }} ! | |
🔍 Inspect the deploy log: ${{ env.BUILD_URL }} | |
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts. |