Skip to content

Commit e86ceab

Browse files
authored
Add a prod upgrade workflow
1 parent 555e73d commit e86ceab

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/production_push.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Upgrade Website to Production
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11+
jobs:
12+
# This workflow contains a single job called "build"
13+
build:
14+
# The type of runner that the job will run on
15+
runs-on: ubuntu-latest
16+
17+
# Steps represent a sequence of tasks that will be executed as part of the job
18+
steps:
19+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
- uses: actions/checkout@v3
21+
22+
# Runs a single command using the runners shell
23+
- name: Checkout Preview Branch
24+
run: git checkout preview
25+
26+
# Runs a set of commands using the runners shell
27+
- name: Create & Push to Production
28+
run: |
29+
git checkout -b production
30+
git add .
31+
git commit -m "Upgraded to production @tmthecoder/portfolio's preview branch"
32+
git push --force origin production

0 commit comments

Comments
 (0)