diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..2f5b58cf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Build and Deploy + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install dependencies + run: mkdir build + + - name: Build React app + run: cd build && echo "hello" > test.txt + + - name: Upload build artifacts + uses: actions/upload-artifact@v2 + with: + name: build-artifacts + path: build + + deploy: + runs-on: shahzaib + needs: build + + steps: + - name: Download build artifacts + uses: actions/download-artifact@v2 + with: + name: build-artifacts + + - name: Copy build folder to self-hosted runner + run: | + ls + pwd + #cp -R ${{ github.workspace }}/build/* C:\Users\Administrator\Desktop diff --git a/.vscode/settings.json b/.vscode/settings.json index 49880a2f..d2357bcc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,8 @@ "prettier.configPath": "", "prettier.useTabs": true, "prettier.withNodeModules": true, - "prettier.vueIndentScriptAndStyle": false + "prettier.vueIndentScriptAndStyle": false, + "githubPullRequests.ignoredPullRequestBranches": [ + "master" + ] } \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 10988103..be4f3335 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { agent { docker { image 'node:lts-alpine' - args '-u root:root' + args '-u root:root'sasasdsa } } steps{ @@ -47,6 +47,7 @@ pipeline { sh './scripts/deploy-for-production.sh' input message: 'Finished using the web site? (Click "Proceed" to continue)' sh './scripts/kill.sh' + sh 'ls' } } }