mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Integration Test (#17)
* Adds a quick npm test * Update .gitignore * Adds additional requirements
This commit is contained in:
parent
f7faf642c5
commit
7b4197087b
19
.github/workflows/main.yml
vendored
Normal file
19
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: Integration Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Build and Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@master
|
||||
env:
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: 'test/build'
|
||||
BUILD_SCRIPT: npm run-script build
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,2 +1,8 @@
|
||||
# .DS_Store
|
||||
.DS_Store
|
||||
|
||||
# Integration Tests
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
test/build
|
BIN
test/image.jpg
Normal file
BIN
test/image.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
32
test/index.html
Normal file
32
test/index.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Integration Test</title>
|
||||
<meta name="robots" content="noindex" />
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-image: url('./image.jpg');
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="image"></div>
|
||||
</body>
|
||||
</html>
|
11
test/package.json
Normal file
11
test/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
{
|
||||
"name": "github-pages-deploy-action-test",
|
||||
"description": "Integration Test for the GitHub Pages Deploy Action",
|
||||
"license": "MIT",
|
||||
"version": "0.0.0",
|
||||
"repository": "",
|
||||
"scripts": {
|
||||
"build": "mkdir build && cp image.jpg ./build/image.jpg && cp index.html ./build/index.html"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user