matrix-art

An image gallery for Matrix
git clone git://archive.git.mtrnord.blog/MTRNord/matrix-art.git
Log | Files | Refs | README | LICENSE

deploy.yml (1792B)


      1 name: Build and Deploy
      2 permissions:
      3   actions: none
      4   checks: none
      5   contents: write
      6   deployments: none
      7   id-token: none
      8   issues: none
      9   discussions: none
     10   packages: none
     11   pages: none
     12   pull-requests: none
     13   repository-projects: none
     14   security-events: none
     15   statuses: none
     16 on:
     17   push:
     18     branches: [main]
     19 jobs:
     20   build-and-deploy:
     21     concurrency: ci-${{ github.ref }}
     22     runs-on: self-hosted
     23     steps:
     24       - name: Checkout 🛎️
     25         uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
     26       - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
     27         name: Setup node
     28         with:
     29           node-version: "18"
     30       - name: Create env file
     31         run: |
     32           echo "VITE_MATRIX_SERVER_URL=https://matrix.art.midnightthoughts.space" > .env.local
     33           echo "VITE_MATRIX_INSTANCE_ADMIN=@administrator:art.midnightthoughts.space" >> .env.local
     34           echo "VITE_MATRIX_ROOT_FOLDER=#Matrix_Art:art.midnightthoughts.space" >> .env.local
     35       - name: Install and Build 🔧
     36         run: |
     37           apt-get update && apt-get install -y patch
     38           npm ci
     39           mv .github/package.json.patch node_modules/matrix-js-sdk/package.json.patch
     40           pushd node_modules/matrix-js-sdk/
     41           patch package.json < package.json.patch
     42           popd
     43           npm run build
     44       - name: Deploy 🚀
     45         uses: JamesIves/github-pages-deploy-action@ba1486788b0490a235422264426c45848eac35c6 # v4.4.1
     46         env:
     47           BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
     48           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     49         with:
     50           branch: gh-pages # The branch the action should deploy to.
     51           folder: dist # The folder the action should deploy.