diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 2bb2adf..0000000 --- a/.drone.yml +++ /dev/null @@ -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 diff --git a/.gitea/workflows/dry-run.yml b/.gitea/workflows/dry-run.yml new file mode 100644 index 0000000..d7c2056 --- /dev/null +++ b/.gitea/workflows/dry-run.yml @@ -0,0 +1,19 @@ +name: dry run building theme +run-name: dry-run + +on: [pull_request] + +jobs: + dry-run: + 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 \ No newline at end of file diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..aa5ad1c --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Build and Publish Theme +run-name: build-and-publish + +on: + push: + branches: + - main + +jobs: + build-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: install aws cli + run: | + apt update -y && apt install -y python python3-pip + pip install awscli + - 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/main.tar.gz s3://dl-gitea-com/theme/ diff --git a/gulpfile.js b/gulpfile.js index 40be756..1867531 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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')) });