You can view an example of this pattern here.
+
+
+```yml
+name: Build and Deploy
+on: [push]
+jobs:
+ build:
+ runs-on: windows-latest # The first job utilizes windows-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - name: Install # The project is built using npm and placed in the 'build' folder.
+ run: |
+ npm install
+ npm run-script build
+
+ - name: Upload Artifacts # The project is then uploaded as an artifact named 'site'.
+ uses: actions/upload-artifact@v1
+ with:
+ name: site
+ path: build
+
+ deploy:
+ needs: [build] # The second job must depend on the first one to complete before running, and uses ubuntu-latest instead of windows.
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - name: Download Artifacts # The built project is downloaded into the 'site' folder.
+ uses: actions/download-artifact@v1
+ with:
+ name: site
+
+ - name: Build and Deploy
+ uses: JamesIves/github-pages-deploy-action@releases/v3
+ with:
+ ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
+ BRANCH: gh-pages
+ FOLDER: 'site' # The deployment folder should match the name of the artifact. Even though our project builds into the 'build' folder the artifact name of 'site' must be placed here.
+```
+
+
## Configuration 📁
diff --git a/lib/git.js b/lib/git.js
index 81fbe162..bdce914f 100644
--- a/lib/git.js
+++ b/lib/git.js
@@ -86,7 +86,7 @@ function deploy() {
}
// Checks out the base branch to begin the deployment process.
yield util_1.execute(`git checkout ${constants_1.action.baseBranch || "master"}`, constants_1.workspace);
- yield util_1.execute(`git fetch origin`, constants_1.workspace);
+ yield util_1.execute(`git fetch ${constants_1.repositoryPath}`, constants_1.workspace);
yield util_1.execute(`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${constants_1.action.branch}`, constants_1.workspace);
/*
Pushes all of the build files into the deployment directory.
diff --git a/package.json b/package.json
index b8c732d5..0b143380 100644
--- a/package.json
+++ b/package.json
@@ -38,12 +38,12 @@
},
"devDependencies": {
"@types/jest": "^24.0.23",
- "@types/node": "^12.12.11",
+ "@types/node": "^12.12.14",
"jest": "^24.8.0",
"jest-circus": "^24.7.1",
"lodash": "^4.17.15",
"prettier": "^1.19.1",
- "ts-jest": "^24.0.2",
+ "ts-jest": "^24.2.0",
"tslint": "^5.20.0",
"typescript": "^3.7.2"
}
diff --git a/src/git.ts b/src/git.ts
index 62aaa867..21a4f543 100644
--- a/src/git.ts
+++ b/src/git.ts
@@ -76,7 +76,7 @@ export async function deploy(): Promise