Skip to content

Commit

Permalink
Update build-push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN authored Jan 4, 2024
1 parent e842a05 commit 7a752a4
Showing 1 changed file with 1 addition and 53 deletions.
54 changes: 1 addition & 53 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,5 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- uses: actions/upload-artifact@v3
with:
name: tmp
path: dist
push:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Prepare
run: |
git checkout --orphan dist/${{ github.ref_name }}
git config --local user.email rete-js[bot]@users.noreply.github.com
git config --local user.name rete-js[bot]
git rm -rf .
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: tmp
path: .

- name: Commit changes
run: |
git add .
git commit -m "build: upload dist"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dist/${{ github.ref_name }}
uses: retejs/.github/.github/workflows/build-push.yml@main

0 comments on commit 7a752a4

Please sign in to comment.