diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-11-02 15:43:35 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-02 15:43:35 +0100 |
commit | bd9e25169b3f71b7aa2bd1aa76cdebf18b65ea8d (patch) | |
tree | b6cab90c05fba1be012ea551f0bd9749a9c66fb0 /.github | |
parent | f53f21ac32edb5e8467d6b98eff2407042f1d227 (diff) |
feat(cd): create proper cd
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 23 | ||||
-rw-r--r-- | .github/workflows/cd.yml | 45 |
2 files changed, 45 insertions, 23 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 83d3bb5..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Build -on: - push: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout project - uses: actions/checkout@v2 - - name: Setup Node.js - uses: actions/[email protected] - with: - node-version: 16.x - - name: Build and push - uses: alexthemaster/[email protected] # check the releases tab on the right for versions (looks like this: v1.0.0) - # use this if you want the sharpest of cutting edges (can and probably WILL break from time to time) - # uses: alexthemaster/action-build-typescript@master - with: - pushToBranch: true # optional; can either be true or false | defaults to false - branch: 'main' # optional; the name of the branch the action should push the compiled code to | defaults to dist - githubToken: ${{ secrets.GITHUB_TOKEN }} # required if you use the pushToBranch option diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..6416ae4 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,45 @@ +--- +# File : cd.yml + +name: 'cd' +on: + push: + branches: [main] +defaults: + run: + shell: 'bash' +jobs: + lint-test-build: + name: '[build]' + runs-on: 'ubuntu-latest' + steps: + - name: '[checkout] ${{ github.repository }} project' + uses: 'actions/checkout@v2' + with: + repository: '${{ github.repository }}' + - name: '[lint]' + run: | + echo TBA some linting + - name: '[test]' + run: | + echo TBA some testing + - name: '[build]' + run: | + git config --global url."https://github.com/".insteadOf ssh://[email protected]/ + git config --global url."https://".insteadOf git:// + git config --global url."https://".insteadOf ssh:// + yarn + yarn build + - name: '[commit changes]' + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add . + git commit -m "chore: build" -a + - name: '[push changes]' + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} +... +# End of ci.yml |