mirror of https://gitea.com/gitea/theme.git
36 lines
978 B
YAML
36 lines
978 B
YAML
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/
|