diff --git a/.drone.yml b/.drone.yml index cf3d530..79e39f9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,60 +1,3 @@ ---- -kind: pipeline -type: docker -name: Build and deploy live website - -platform: - os: linux - arch: arm64 - -workspace: - base: /srv/app - path: src - -steps: - - name: build - pull: always - image: golang:1.19 - commands: - - make clean - - make build - - - name: publish - pull: always - image: techknowlogick/drone-netlify:latest - settings: - path: public/ - site_id: 05515f14-3702-4a84-9ff3-88ba90fe08dd - environment: - NETLIFY_TOKEN: - from_secret: netlify_token - when: - event: - - push - - - name: discord - pull: always - image: appleboy/drone-discord:1 - environment: - DISCORD_WEBHOOK_ID: - from_secret: discord_webhook_id - DISCORD_WEBHOOK_TOKEN: - from_secret: discord_webhook_token - when: - event: - - push - - tag - status: - - changed - - failure - -trigger: - branch: - - main - event: - exclude: - - pull_request - --- kind: pipeline type: docker diff --git a/.github/issue_template.md b/.gitea/issue_template.md similarity index 100% rename from .github/issue_template.md rename to .gitea/issue_template.md diff --git a/.github/pull_request_template.md b/.gitea/pull_request_template.md similarity index 100% rename from .github/pull_request_template.md rename to .gitea/pull_request_template.md diff --git "a/.gitea/workflows/publish-blog.yml\t" "b/.gitea/workflows/publish-blog.yml\t" new file mode 100644 index 0000000..424cc4b --- /dev/null +++ "b/.gitea/workflows/publish-blog.yml\t" @@ -0,0 +1,36 @@ +name: build and publish + +on: + push: + branches: + - main + +jobs: + lint: + name: build and publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + - name: Setup Hugo + uses: https://github.com/peaceiris/actions-hugo@v2 + with: + hugo-version: '0.111.3' + extended: true + - name: setup go + uses: https://github.com/actions/setup-go@v4 + with: + go-version: '>=1.20.1' + - name: Build + run: | + make clean + make build + - name: publish to netlify + uses: https://github.com/nwtgck/actions-netlify@v2.0 + with: + publish-dir: public + production-branch: main + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: 05515f14-3702-4a84-9ff3-88ba90fe08dd diff --git "a/.gitea/workflows/test-pr.yml\t" "b/.gitea/workflows/test-pr.yml\t" new file mode 100644 index 0000000..9d5f2d9 --- /dev/null +++ "b/.gitea/workflows/test-pr.yml\t" @@ -0,0 +1,24 @@ +name: check-and-test + +on: + - push + - pull_request + +jobs: + check-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Hugo + uses: https://github.com/peaceiris/actions-hugo@v2 + with: + hugo-version: '0.111.3' + extended: true + - name: setup go + uses: https://github.com/actions/setup-go@v4 + with: + go-version: '>=1.20.1' + - name: Build + run: | + make clean + make build