Skip to content

Commit

Permalink
feat: switch netlify tld to .app (#3)
Browse files Browse the repository at this point in the history
* feat: switch netlify tld to .app

* feat: adding test site for pr previews
  • Loading branch information
JakePartusch authored Apr 22, 2020
1 parent 13daa61 commit 7dcdeb4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
uses: ./ # Uses an action in the root directory
id: waitFor200
with:
site_name: "jakepartusch"
site_name: "happy-kilby-80bc73"
max_timeout: 60
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Do you have other Github actions (Lighthouse, Cypress, etc) that depend on the N

### `site_name`

**Required** The name of the Netlify site to reach `https://{site_name}.netlify.com`
**Required** The name of the Netlify site to reach `https://{site_name}.netlify.app`

### `max_timeout`

Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const waitForUrl = async (url, MAX_TIMEOUT) => {
return;
} catch (e) {
console.log("Url unavailable, retrying...");
await new Promise(r => setTimeout(r, 2000));
await new Promise((r) => setTimeout(r, 2000));
}
}
core.setFailed(`Timeout reached: Unable to connect to ${url}`);
Expand All @@ -29,7 +29,7 @@ const run = async () => {
if (!siteName) {
core.setFailed("Required field `site_name` was not provided");
}
const url = `https://deploy-preview-${PR_NUMBER}--${siteName}.netlify.com`;
const url = `https://deploy-preview-${PR_NUMBER}--${siteName}.netlify.app`;
core.setOutput("url", url);
console.log(`Waiting for a 200 from: ${url}`);
await waitForUrl(url, MAX_TIMEOUT);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "echo \"Built successfully\""
},
"keywords": [],
"author": "",
Expand Down
3 changes: 3 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<html>
<h1>Hello World</h1>
</html>

0 comments on commit 7dcdeb4

Please sign in to comment.