Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta: migrate to GitHub Actions #113

Merged
merged 1 commit into from
Jul 13, 2020
Merged

Meta: migrate to GitHub Actions #113

merged 1 commit into from
Jul 13, 2020

Conversation

foolip
Copy link
Member

@foolip foolip commented Jun 15, 2020

Part of whatwg/meta#173.

@foolip foolip mentioned this pull request Jun 15, 2020
25 tasks
foolip added a commit to whatwg/misc-server that referenced this pull request Jun 15, 2020
FORCE_COLOR also works for jest, so we can use this for
participate.whatwg.org as well:
whatwg/participate.whatwg.org#113
foolip added a commit to whatwg/misc-server that referenced this pull request Jun 15, 2020
FORCE_COLOR also works for jest, so we can use this for
participate.whatwg.org as well:
whatwg/participate.whatwg.org#113
@foolip foolip marked this pull request as ready for review June 17, 2020 09:17
@foolip foolip requested a review from domenic as a code owner June 17, 2020 09:17
@foolip
Copy link
Member Author

foolip commented Jun 17, 2020

@domenic this isn't far from working, but there's one detail to sort out I'd like your input on, on how sg/db.json is deployed.

As it is (before this change), npm install will clone or update the sg repository. In addition, deploy.sh does npm run update-sg to do the same step. The sg/db.json file thus checkout out is rsynced to the server. Then npm install --production is run on the server, but that will fail because the sg directory exists, but it isn't a git repo:
https://travis-ci.org/github/whatwg/participate.whatwg.org/builds/693501118

Another silent failure mode is likely if changing things a bit, namely that one has a checkout out the participate.whatwg.org repo but the sg/ directory is just a directory. The git -C sg pull command would then succeed, but because it updated the participate.whatwg.org repo.

What should we do? The most elaborate/fanciful would be to release sg/db.json as an npm package and depend on that.

@domenic
Copy link
Member

domenic commented Jun 18, 2020

I don't have strong feelings about how we get sg.json; per #100 I only used Git to fetch it because that was slightly easier. If it makes things simpler to change npm run update-sg to curl https://raw.githubusercontent.com/whatwg/sg/master/db.json, then we should switch to that.

I'm also OK removing the postinstall step. In that case let's just update the README to note that you need to run npm run update-sg in addition to npm install.

I don't think we need to publish the SG data as an npm package :).

@domenic
Copy link
Member

domenic commented Jul 6, 2020

@foolip ping on finishing this up :)

foolip added a commit that referenced this pull request Jul 13, 2020
The prepare script is intended for this type of thing:
https://docs.npmjs.com/misc/scripts#prepublish-and-prepare

A non-obvious and seemingly undocumented feature is important here:
`npm install --production` won't run the prepare script. If it did, we
wouldn't need `npm run update-sg` in the deploy.sh script.

Fixes the issue described in #113 (comment).
@foolip
Copy link
Member Author

foolip commented Jul 13, 2020

@domenic I've sent #125 which I think should fix the broken deploy on Travis. I'm hopeful that combined with this, everything should then work.

domenic pushed a commit that referenced this pull request Jul 13, 2020
The prepare script is intended for this type of thing:
https://docs.npmjs.com/misc/scripts#prepublish-and-prepare

A non-obvious and seemingly undocumented feature is important here:
`npm install --production` won't run the prepare script. If it did, we
wouldn't need `npm run update-sg` in the deploy.sh script.

Fixes the issue described in #113 (comment).
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently needs a slight rebase, but otherwise LGTM!

@foolip
Copy link
Member Author

foolip commented Jul 13, 2020

Things look good. Let's see if the actual deploy works by merging this, then. I'll switch the branch protection around too.

@foolip foolip merged commit 5ebfe7e into master Jul 13, 2020
@foolip foolip deleted the github-actions branch July 13, 2020 17:51
@domenic
Copy link
Member

domenic commented Jul 13, 2020

Something wrong with the key-loading... feel free to force-push until it works, assuming the changes are minimal.

@foolip
Copy link
Member Author

foolip commented Jul 13, 2020

@foolip
Copy link
Member Author

foolip commented Jul 13, 2020

Fixed in #126 (not force pushed, as I wasn't entirely sure you meant the master branch.

The new failure I think is because the secrets point to the wrong droplet. Fixing.

@foolip
Copy link
Member Author

foolip commented Jul 13, 2020

Alright, it's now deployed and seems to work as usual.

@domenic
Copy link
Member

domenic commented Jul 13, 2020

Awesome, thanks!

domenic added a commit that referenced this pull request Jan 25, 2021
This was missed in the migration to GitHub Actions in #113.
@domenic domenic mentioned this pull request Jan 25, 2021
domenic added a commit that referenced this pull request Jan 25, 2021
This was missed in the migration to GitHub Actions in #113.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants