Sets the status of a node to 1 (published).
Drupal\node\Node $node: A node entity.
$context: (optional) Array of additional information about what triggered the action. Not used for this action.
function node_publish_action(Node $node, $context = array()) {
$node->status = NODE_PUBLISHED;
watchdog('action', 'Set @type %title to published.', array(
'@type' => node_get_type_label($node),
'%title' => $node
->label(),
));
}