Use Gitea Actions to build and publish

This commit is contained in:
techknowlogick 2023-03-07 02:03:48 -05:00
parent aa3c84e28b
commit b07261badc
3 changed files with 33 additions and 60 deletions

View File

@ -1,59 +0,0 @@
---
kind: pipeline
name: default
platform:
os: linux
arch: arm64
steps:
- name: build
pull: always
image: node:latest
commands:
- npm install
- npm run clean
- npm run build
- npm run release
- name: release
pull: always
image: woodpeckerci/plugin-s3:latest
settings:
acl:
from_secret: aws_s3_acl
region:
from_secret: aws_s3_region
bucket:
from_secret: aws_s3_bucket
endpoint:
from_secret: aws_s3_endpoint
path_style:
from_secret: aws_s3_path_style
strip_prefix: dist/
source: dist/master.tar.gz
target: /theme
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
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

View File

@ -0,0 +1,32 @@
name: Build and Publish Docs site
run-name: docusaurus build docs site
on:
push:
branches:
- main
- techknowlogick-patch-1
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: build npm
run: |
npm ci
npm run clean
npm run build
npm run release
- name: aws credential configure
uses: https://github.com/aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Copy files to the production website with the AWS CLI
run: |
aws s3 cp dist/master.tar.gz s3://dl-gitea-com/theme/

View File

@ -35,7 +35,7 @@ gulp.task('watch', function () {
gulp.task('release', function () {
return gulp.src(sources)
.pipe(tar('master.tar'))
.pipe(tar('main.tar'))
.pipe(gzip())
.pipe(gulp.dest('dist'))
});