Skip to content

Commit

Permalink
manual deploy(34)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaskar1001101 committed Apr 26, 2024
1 parent c23e4ea commit 5ba1d95
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/copyDeploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Copy to deploy branch

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Copy files from main to deploy branch
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
git checkout -b deploy
git rm -rf .
git checkout main -- .
- name: Install dependencies and build
run: |
git checkout deploy
npm install
npm run build
- name: Remove files and folders except dist
run: |
git checkout deploy
rm -r $(ls -A | grep -v dist | grep -v .git)
- name: Move files from dist to root
run: |
git checkout deploy
mv dist/* .
rm -rf dist
- name: Commit and push changes
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
git add .
git commit -m "Push build files to deploy branch"
git push origin deploy -f
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h1 id="loadingText">
<li class="xl:ml-5">
<div
class="apply-button"
data-hackathon-slug="statuscode-1"
data-hackathon-slug="statuscode 1"
data-button-theme="dark"
style="height: 44px; width: 312px"
></div>
Expand Down

0 comments on commit 5ba1d95

Please sign in to comment.