diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index c009fd6..0000000 --- a/.drone.yml +++ /dev/null @@ -1,112 +0,0 @@ ---- -kind: pipeline -type: docker -name: CD - -steps: -- name: restore cache node - image: drillster/drone-volume-cache - volumes: - - name: conlang-node - path: /cache/conlang/node - settings: - restore: true - mount: - - ./node_modules - -- name: restore cache emacs - image: drillster/drone-volume-cache - volumes: - - name: conlang-emacs - path: /cache/conlang/emacs - settings: - restore: true - mount: - - /root/.emacs.d - -- name: generate emacs - image: silex/emacs:master-alpine - commands: - - apk update && apk add git - - emacs -Q --script export.el - - pwd - - find / -name '*.org' - - find / -name '*.md' - depends_on: - - "restore cache emacs" - -- name: generate node - image: node:19-alpine - commands: - - yarn - - yarn docs:build - depends_on: - - "restore cache node" - - "generate emacs" - -- name: rebuild cache emacs - image: drillster/drone-volume-cache - volumes: - - name: conlang-emacs - path: /cache/conlang/emacs - settings: - rebuild: true - mount: - - /root/.emacs.d - depends_on: - - "generate emacs" - -- name: rebuild cache node - image: drillster/drone-volume-cache - volumes: - - name: conlang-node - path: /cache/conlang/node - settings: - rebuild: true - mount: - - ./node_modules - depends_on: - - "generate node" - -- name: deploy - image: appleboy/drone-scp - settings: - host: - from_secret: ssh_host - target: - from_secret: ssh_target - source: docs/.vuepress/dist/* - strip_components: 3 - username: - from_secret: ssh_username - password: - from_secret: ssh_password - port: - from_secret: ssh_port - depends_on: - - "generate node" - when: - branch: - - main - event: - exclude: - - pull_request - -- name: purge cache - image: jetrails/drone-cloudflare-caching - settings: - api_token: - from_secret: cloudflare_cache_api - zone_identifier: - from_secret: phundrak_com_zone_id - action: purge_files - list: - - https://conlang.phundrak.com - depends_on: - - "deploy" - when: - branch: - - devel - event: - exclude: - - pull_request diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..d1bb80f --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,32 @@ +name: deploy +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: purcell/setup-emacs@master + with: + version: 29.1 + - name: "Export org to md" + run: emacs -Q --script export.el + - uses: actions/setup-node@v3 + with: + node-version: 18.x + - run: npm ci + - name: "Build" + run: npm run docs:build + - name: "Deploy" + uses: appleboy/scp-action@v0.1.7 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} + source: docs/.vuepress/dist/* + target: ${{ secrets.DESTPATH }} + strip_components: 3