From cc62d0bb95eb3b8099f5fe178dc356ceee4b43ed Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sun, 9 Feb 2025 12:05:00 +0100 Subject: [PATCH] chore: deploy to Cloudflare Pages --- .gitea/workflows/deploy.yaml | 41 ---------------------------- .github/workflows/deploy.yaml | 50 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 41 deletions(-) delete mode 100644 .gitea/workflows/deploy.yaml create mode 100644 .github/workflows/deploy.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml deleted file mode 100644 index 1211fd6..0000000 --- a/.gitea/workflows/deploy.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: deploy -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v4 - with: - node-version: 22.x - - run: npm ci - - uses: purcell/setup-emacs@master - with: - version: 29.1 - - name: "Export org to md" - run: emacs -Q --script export.el - - run: npm run build - - name: "Deploy on the Web" - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - key: ${{ secrets.KEY }} - port: ${{ secrets.PORT }} - source: content/.vuepress/dist/* - target: ${{ secrets.DESTPATH }} - strip_components: 3 - - name: "Deploy on Gemini" - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - key: ${{ secrets.KEY }} - port: ${{ secrets.PORT }} - source: gemini/* - target: ${{ secrets.DESTPATH_GMI }} - strip_components: 1 diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..804f3a6 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,50 @@ +name: deploy +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 + with: + node-version: 22.x + - run: npm ci + - uses: purcell/setup-emacs@master + with: + version: 29.1 + - name: "Export org to md" + run: emacs -Q --script export.el + - run: npm run build + - name: "Deploy to Cloudflare Pages" + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.ACCOUNT_ID }} + projectName: phundrak-com + directory: content/.vuepress/dist/ + githubToken: ${{ secrets.TOKEN }} + + # - name: "Deploy on the Web" + # uses: appleboy/scp-action@v0.1.7 + # with: + # host: ${{ secrets.HOST }} + # username: ${{ secrets.USERNAME }} + # key: ${{ secrets.KEY }} + # port: ${{ secrets.PORT }} + # source: content/.vuepress/dist/* + # target: ${{ secrets.DESTPATH }} + # strip_components: 3 + # - name: "Deploy on Gemini" + # uses: appleboy/scp-action@v0.1.7 + # with: + # host: ${{ secrets.HOST }} + # username: ${{ secrets.USERNAME }} + # key: ${{ secrets.KEY }} + # port: ${{ secrets.PORT }} + # source: gemini/* + # target: ${{ secrets.DESTPATH_GMI }} + # strip_components: 1