mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2025-05-11 03:45:27 +08:00
add: hugoPath
This commit is contained in:
parent
fddee393fc
commit
349881b966
4
index.js
4
index.js
@ -41,10 +41,12 @@ async function run() {
|
|||||||
const hugoURL = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/${hugoName}.tar.gz`;
|
const hugoURL = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/${hugoName}.tar.gz`;
|
||||||
core.debug('hugoURL:', hugoURL);
|
core.debug('hugoURL:', hugoURL);
|
||||||
|
|
||||||
|
const hugoPath = '/github/home/bin';
|
||||||
|
await io.mkdirP(hugoPath);
|
||||||
const hugoTarball = await tc.downloadTool(hugoURL);
|
const hugoTarball = await tc.downloadTool(hugoURL);
|
||||||
const hugoExtractedFolder = await tc.extractTar(hugoTarball, '/tmp');
|
const hugoExtractedFolder = await tc.extractTar(hugoTarball, '/tmp');
|
||||||
core.debug('hugoExtractedFolder:', hugoExtractedFolder);
|
core.debug('hugoExtractedFolder:', hugoExtractedFolder);
|
||||||
await io.mv(`${hugoExtractedFolder}/hugo`, '/usr/local/bin/');
|
await io.mv(`${hugoExtractedFolder}/hugo`, hugoPath);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
Loading…
Reference in New Issue
Block a user