2 files changed, 27 insertions(+), 18 deletions(-)
A .build.yml
D .gitlab-ci.yml
A .build.yml => .build.yml +27 -0
@@ 0,0 1,27 @@
+image: alpine:edge
+oauth: pages.sr.ht/PAGES:RW
+packages:
+ - nodejs
+ - yarn
+ - npm
+ - python3
+ - pixman-dev
+ - cairo-dev
+ - pango-dev
+ - make
+ - g++
+ - libjpeg-turbo-dev
+ - hut
+sources:
+ - https://github.com/vector-im/element-web#v1.10.8
+tasks:
+ build: |
+ cd element-web
+ yarn install --frozen-lockfile
+ yarn build
+ pack: |
+ cp config.json element-web/webapp/
+ cp Information_Block.ogg element-web/webapp/media/message.ogg
+ tar -C element-web/webapp -cvz . > https.tar.gz
+ publish: |
+ hut pages publish https.tar.gz --domain element.xdavidwu.link
D .gitlab-ci.yml => .gitlab-ci.yml +0 -18
@@ 1,18 0,0 @@
-https:
- stage: deploy
- image: alpine:latest
- variables:
- VER: 1.10.8
- before_script:
- - apk add nodejs yarn git curl npm python3 pixman-dev cairo-dev pango-dev make g++ libjpeg-turbo-dev
- - wget https://github.com/vector-im/element-web/archive/refs/tags/v$VER.tar.gz
- - tar -xf v$VER.tar.gz
- - mkdir public
- script:
- - cd element-web-$VER
- - yarn install --frozen-lockfile
- - yarn build
- - cp ../config.json webapp/
- - cp ../Information_Block.ogg webapp/media/message.ogg
- - tar -C webapp -cvz . > https.tar.gz
- - curl --oauth2-bearer "$SRHT_PAT" -Fcontent=@https.tar.gz -Fprotocol=HTTPS https://pages.xdavidwu.link/publish/element.xdavidwu.link